// pages/flagship/flagship.js
Component({
  /**
   * 组件的属性列表
   */
  properties: {

  },

  /**
   * 组件的初始数据
   */
  data: {
    gzdp: 1,
    clicknum: 0,
    imgUrls: [
      'http://img02.tooopen.com/images/20150928/tooopen_sy_143912755726.jpg',
      'http://img06.tooopen.com/images/20160818/tooopen_sy_175866434296.jpg',
      'http://img06.tooopen.com/images/20160818/tooopen_sy_175833047715.jpg'
    ],
    recommendnav: [
      { name: '首页', id: '1' },
      { name: '冷冻食材', id: '1' },
      { name: '生鲜食材', id: '1' },
      { name: '米面粮油', id: '1' },
      { name: '酒水饮料', id: '1' },
      { name: '厨房用品', id: '1' },
      { name: 'MORE+', id: '1' }
    ],
    indexlist:[
      {
        headtitle:'冷冻食材',
        goodslist:[
          {id:'42',img:'../../resource/image/cp1.jpg',title:'产品名称42',price:'18.09'},
          { id: '43', img: '../../resource/image/cp2.jpg', title: '产品名称43', price: '8.26' },
          { id: '44', img: '../../resource/image/cp6.jpg', title: '产品名称44', price: '188.88' },
          { id: '45', img: '../../resource/image/cp7.jpg', title: '产品名称45', price: '56.20' }
        ]
      },
      {
        headtitle: '生鲜食材',
        goodslist: [
          { id: '52', img: '../../resource/image/cp1.jpg', title: '产品名称52', price: '18.09' },
          { id: '53', img: '../../resource/image/cp2.jpg', title: '产品名称53', price: '8.26' },
          { id: '54', img: '../../resource/image/cp6.jpg', title: '产品名称54', price: '188.88' },
          { id: '55', img: '../../resource/image/cp7.jpg', title: '产品名称55', price: '56.20' }
        ]
      }
    ],
    goodslist:[
      { id: '52', img: '../../resource/image/cp1.jpg', title: '产品名称52', price: '18.09' },
      { id: '53', img: '../../resource/image/cp2.jpg', title: '产品名称53', price: '8.26' },
      { id: '54', img: '../../resource/image/cp6.jpg', title: '产品名称54', price: '188.88' },
      { id: '55', img: '../../resource/image/cp7.jpg', title: '产品名称55', price: '56.20' },
      { id: '52', img: '../../resource/image/cp1.jpg', title: '产品名称52', price: '18.09' },
      { id: '53', img: '../../resource/image/cp2.jpg', title: '产品名称53', price: '8.26' },
      { id: '54', img: '../../resource/image/cp6.jpg', title: '产品名称54', price: '188.88' },
      { id: '55', img: '../../resource/image/cp7.jpg', title: '产品名称55', price: '56.20' }
    ]
  },

  /**
   * 组件的方法列表
   */
  methods: {
    gzdp:function(){
      this.setData({'gzdp': !this.data.gzdp})
    },
    navclick: function (e) {
      this.setData({ 'clicknum': e.currentTarget.dataset.index })
    }
  }
})
